package com.zhao.dota.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhao.dota.model.PlayerProcess;
import com.zhao.dota.vo.PlayerProcessVo;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PlayerProcessMapper extends BaseMapper<PlayerProcess> {

    @Select("SELECT pp.*,mp.name,mp.hero_localized_name, mp.team FROM `player_process` pp " +
            "  left join match_player mp " +
            "   on pp.match_player_id = mp.id " +
            " where pp.match_id = #{matchId} " +
            " order by time asc, team asc")
    List<PlayerProcessVo> findByMatchId(Integer matchId);

}
